package info.lumanman.switchdatabase.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import info.lumanman.switchdatabase.service.BookService;
import info.lumanman.switchdatabase.two.dao.BookDao;
import info.lumanman.switchdatabase.two.entry.Book;
import info.lumanman.switchdatabase.util.DataSource;
import info.lumanman.switchdatabase.util.DataSources;

@Service("bookService")
public class BookServiceServiceImpl implements BookService {

	@Autowired
	private BookDao bookDao;

	@DataSource(value=DataSources.slave)
	@Override
	public List<Book> getBookList() {
		List<Book> map = bookDao.getBookList();
		return map;
	}

}
